package com.example.gittestmodelone

import java.math.BigDecimal
import java.math.RoundingMode

class ArithUtil {
    fun add(vararg s: String): String {
        val result = BigDecimal(0)
        for (i in s) {
            result.add(BigDecimal(i))
        }
        return "$result"
    }

    fun formatAsMoney(s: BigDecimal): BigDecimal {
        return s.setScale(2, RoundingMode.HALF_UP)
    }
}